home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / repair / semantic.h < prev    next >
C/C++ Source or Header  |  2006-01-09  |  1KB  |  58 lines

  1. /* Copyright 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by
  2.    reiser4progs/COPYING.
  3.    
  4.    repair/semantic.h -- the structures and methods needed for semantic
  5.    pass of fsck. */
  6.  
  7. #ifndef REPAIR_SEM_H
  8. #define REPAIR_SEM_H
  9.  
  10. #include <time.h>
  11. #include <repair/librepair.h>
  12.  
  13. #define LOST_PREFIX "lost_name_"
  14.  
  15. /* Statistics gathered during the pass. */
  16. typedef struct repair_semantic_stat {
  17.     uint64_t reached_files;
  18.     uint64_t lost_files;
  19.     uint64_t shared, rm_entries, broken;
  20.     uint64_t oid;
  21.  
  22.     /* Files counted on previous passes. */
  23.     uint64_t statdatas;
  24.     uint64_t files;
  25.     time_t time;
  26. } repair_semantic_stat_t;
  27.  
  28. typedef struct repair_ancestor {
  29.     reiser4_object_t *object;
  30.     entry_type_t link;
  31. } repair_ancestor_t;
  32.  
  33. /* Data semantic pass works on. */
  34. typedef struct repair_semantic {
  35.     repair_data_t *repair;
  36.  
  37.     reiser4_object_t *root;
  38.     reiser4_object_t *lost;
  39.     
  40.     repair_semantic_stat_t stat;
  41.  
  42.     aal_gauge_t *gauge;
  43. } repair_semantic_t;
  44.  
  45. extern errno_t repair_semantic(repair_semantic_t *sem);
  46.  
  47. typedef errno_t (*semantic_link_func_t) (reiser4_object_t *object,
  48.                      reiser4_object_t *parent,
  49.                      entry_type_t link, 
  50.                      void *data);
  51.  
  52. extern reiser4_object_t *repair_semantic_open_child(reiser4_object_t *parent,
  53.                             entry_hint_t *entry,
  54.                             repair_data_t *repair,
  55.                             semantic_link_func_t func,
  56.                             void *data);
  57. #endif
  58.